function filtered_sig = LowpassFilter(sig, dt, bandwidth, varargin)
%LOWPASSFILTER Filter the signal with a Lowpass filter.
    
    sampleRate = 1/dt;
    d = designfilt('lowpassfir', 'PassbandFrequency', bandwidth, 'StopbandFrequency', 2*bandwidth, 'PassbandRipple', 1, 'StopbandAttenuation', 48, 'SampleRate', sampleRate);
    filtered_sig = filter(d,sig);


end

